<template>
  <div>
    <PoemBody :titleUrl="false" :poemData="poemInfo" :type="0"/>
    <el-card class="box-card">
      <div slot="header" class="clearfix  flex-col al-left">
        <span>译文及注释</span>
      </div>
      <div class="flex-col al-left">
        <p style="text-align: left;margin: 0" v-html="poemInfo.ptranslate"></p>
      </div>
    </el-card>
  </div>
</template>

<script>
import PoemBody from '@/components/PoemBody'
import {reqGetPoemSingle} from '@/API/modules/poem'

export default {
  name: "PoemItem",
  components: {
    PoemBody
  },
  data() {
    return {
      poemInfo: {}
    }
  },
  methods: {
    async getSinglePoem(pid) {
      let result = await reqGetPoemSingle(pid);
      if (result.status == 200) {
        this.poemInfo = result.data.data
      }
    }
  }
  , mounted() {
   this.getSinglePoem(this.$route.params.id)
  }

}
</script>

<style lang="scss" scoped>

</style>